package com.mycompany.app.hr.organization.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * Cost center is the second level of the organization level currently in
 * client’s WuXi site.
 * 
 * @author Shawn.guo
 */
@Entity
@Table(name = "org_cost_center")
public class CostCenter {

    @Id
    @Column(name = "cost_center_id")
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    @Id
    @Column(name = "cost_center_code")
    @GeneratedValue(strategy = GenerationType.AUTO)
    private String Code;

    @Column(name = "cost_center_name")
    private String Name;

    @Column(name = "cost_center_description")
    private String Description;

    @Column(name = "cost_center_header")
    private String header;

    private Operation operation;

    @Column(name = "is_active")
    private Boolean isActive;

    //==================
    @Override
    public String toString() {

        return ToStringBuilder.reflectionToString(this,
                ToStringStyle.SHORT_PREFIX_STYLE);
    }

    //==================

    public String getCode() {

        return Code;
    }

    public void setCode(String code) {

        Code = code;
    }

    public String getName() {

        return Name;
    }

    public void setName(String name) {

        Name = name;
    }

    public String getDescription() {

        return Description;
    }

    public void setDescription(String description) {

        Description = description;
    }

    public String getHeader() {

        return header;
    }

    public void setHeader(String header) {

        this.header = header;
    }

    public Operation getOperation() {

        return operation;
    }

    public void setOperation(Operation operation) {

        this.operation = operation;
    }

    public Boolean getIsActive() {

        return isActive;
    }

    public void setIsActive(Boolean isActive) {

        this.isActive = isActive;
    }

    public Long getId() {

        return id;
    }

    public void setId(Long id) {

        this.id = id;
    }

}
